package cn.edu.nju.ws.aquila.rdf.sentence;


import java.util.ArrayList;

import com.hp.hpl.jena.rdf.model.Statement;

/**
 * An RDF sentence
 * 
 * @author Gong Cheng
 * 
 */
public class RDFSentence {
	private ArrayList<Statement> statements = null;

	private byte[] hash = null;

	public RDFSentence() {
		this.statements = new ArrayList<Statement>(1);
	}

	public ArrayList<Statement> getStatements() {
		return this.statements;
	}

	public void addStatement(Statement statement) {
		this.statements.add(statement);
	}

	public byte[] getHash() {
		return this.hash;
	}

	public void setHash(byte[] hash) {
		this.hash = hash;
	}

	public void display() {
		for (Statement stmt : this.statements) {
			System.out.println(stmt);
		}
	}

	public void close() {
		this.statements.clear();
		this.statements = null;
		this.hash = null;
	}
}